﻿@model HanGu.Entity.Manager
@{
    ViewBag.Title = "管理员(添加/修改)";
        //Layout = "~/Views/Shared/AdminLayout.cshtml";
}
<div class="pageContent">
    <form method="post" action="admin/manager/create" class="pageForm required-validate"
    onsubmit="return validateCallback(this, navTabAjaxDone);">
    @Html.ValidationSummary(true)
    <div class="pageFormContent" layouth="56">
        @Html.HiddenFor(model => model.ID)
        <p>
            <label>
                账号：</label>
            @if (Model.ID > 0)
            { 
             @Html.TextBoxFor(model => model.User, new { @class = "required", @Readonly = "Readonly" })
            }
            else
            {
                @Html.TextBoxFor(model => model.User, new { @class = "required" })
            }
            @Html.ValidationMessageFor(model => model.User)
        </p>
        <p>
            <label>
                真实名字：</label>
            @Html.EditorFor(model => model.RealName)
            @Html.ValidationMessageFor(model => model.RealName)
        </p>
        @if (Model.ID < 1)
        {            
            
            <p>
                <label>
                    密码：</label>
                @Html.PasswordFor(model => model.Pwd, new { @class = "required alphanumeric", @Type = "password", minlength = "6", maxlength = "20", alt = "字母、数字、下划线 6-20位" })
                @Html.ValidationMessageFor(model => model.Pwd)
            </p>

            <p>
                <label>
                    确认密码：</label>
                @Html.PasswordFor(model => model.Pwd, new { @class = "required", @Type = "password", equalto = "#Pwd" })
                @Html.ValidationMessageFor(model => model.Pwd)
            </p>
        }

@*<p>
				<label>角色：</label>
				
					@Html.EditorFor(model =>model.RoleID,"class='required'")
                    @Html.ValidationMessageFor(model => model.RoleID)					
				
			</p>*@
    </div>
    <div class="formBar">
        <ul>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="submit">
                            提交</button></div>
                </div>
            </li>
            <li>
                <div class="button">
                    <div class="buttonContent">
                        <button type="button" class="close">
                            取消</button></div>
                </div>
            </li>
        </ul>
    </div>
    </form>
</div>
